package book;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: DickYang
 * Date: 2023-05-28
 * Time: 10:38
 */
public class BookList {
    private Book[] books = new Book[10];
    private int userSize;

    public BookList() {
        books[0] = new Book("三国演义","罗贯中",89,"小说");
        books[1] = new Book("西游记","吴承恩",78,"小说");
        books[2] = new Book("红楼梦","曹雪芹",67,"小说");
        this.userSize = 3;
    }

    public Book getBooks(int pos) {
        return books[pos];
    }

    public void setBooks(Book book) {
        this.books[userSize] = book;
    }

    public void setBooks(int j ,Book book) {
        this.books[j] = book;
    }

    public int getUserSize() {
        return userSize;
    }

    public void setUserSize(int userSize) {
        this.userSize = userSize;
    }
}
